home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / hypercar / mactool / netsnoop.sit / Net Snooper Stack 2.0d6 / stack_-1.xml < prev    next >
Encoding:
Extensible Markup Language  |  1991-04-19  |  8.6 KB  |  36 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in.0d6</name>
  5.     <id>-1</id>
  6.     <cardCount>12</cardCount>
  7.     <cardID>65616</cardID>
  8.     <listID>2982</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>432</height>
  15.     </cardSize>
  16.     <script>on openstack
  17. --
  18. -- HyperStation interacts very heavily with Hypercard and relies
  19. -- on the existence of the following global containers.  If you write
  20. -- your own script, just cut and paste these two lines.  HyperStation
  21. -- will do the rest.
  22. --
  23. global globalATPData, globalResponseData
  24. global globalReceiveData,  myEntityName
  25. global globalSKTData, globalNBPData
  26.  
  27. create menu "Collect"
  28. put "Run,Lookup,UnNamed,Do Pass" ┬¼
  29. into menu "Collect" with menuMessages "run,lookup,unnamed,doPass"
  30. put "-,Zone Lists,Zone Cards,Summaries" ┬¼
  31. after menu "Collect" with menuMessages "empty,go card "Zone List",go first card of bkgnd "zoneInformation",go first card of bkgnd "Summaries""
  32.  
  33. create menu "Summaries"
  34. put "Verify,Verify All,-,Total Card,Summarize All,-,Clear Card,Clear Zone Cards,Clear Summaries,Clear Stack," ┬¼
  35. into menu "Summaries" with menuMessages "verify,verifyAll,empty,totalcard,summarizeStack,empty,clearCard,clearZoneCards,clearSummaries,clearStack"
  36.  
  37. put empty into globalResponseData
  38. put empty into globalAppleTalkData
  39.  
  40. -- Before we can become an entity on the network, we must first
  41. -- open up access to the network.  ATOPEN performs this fucntion
  42. -- and relies on the container "globalappleTalkData".  DO NOT
  43. -- use Hyperstation unless your stack defines this global.
  44. --
  45. -- Since ATOpen is not given a parameter, it will open both a client
  46. -- and a server side allowing us to both issue requests and respond
  47. -- to requests from this node.
  48. --
  49. atpopen
  50. if the result is empty then
  51. --
  52. -- if ATOpen was successful, we can go ahead and register our name
  53. -- with the network. If no name is specified (as is the case here),
  54. -- then the name selected in the chooser will be used.
  55. --
  56. nbpopen
  57. nbpregisterName "Big Brother"
  58. if the result is empty then
  59. -- You're connected and ready to go.  Remember, you'll need
  60. -- to do a lookup using the lookup button before you can talk
  61. -- to any servers.
  62. --
  63. end if
  64. end if
  65. end openstack
  66.  
  67. on closestack
  68. put empty into GlobalResponseData
  69. put empty into GlobalAppleTalkData
  70. --hide background button "memo"
  71. NBPClose
  72. ATPClose
  73. reset menubar
  74. end closestack
  75.  
  76. on MinMenus
  77. disable menuItem "Lookup" of menu "Collect"
  78. disable menuItem "UnNamed" of menu "Collect"
  79. disable menuItem "Do Pass" of menu "Collect"
  80. disable menuItem "Verify" of menu "Summaries"
  81. disable menuItem "Clear Card" of menu "Summaries"
  82. disable menuItem "Total Card" of menu "Summaries"
  83. end MinMenus
  84.  
  85. on maxMenus
  86. enable menuItem "Lookup" of menu "Collect"
  87. enable menuItem "UnNamed" of menu "Collect"
  88. enable menuItem "Do Pass" of menu "Collect"
  89. enable menuItem "Verify" of menu "Summaries"
  90. enable menuItem "Clear Card" of menu "Summaries"
  91. enable menuItem "Total Card" of menu "Summaries"
  92. end maxMenus
  93.  
  94. -- on idle
  95. -- atpreceive "HandleRequest"
  96. -- end idle
  97.  
  98. -- on HandleRequest
  99. -- global globalResponseData
  100. -- --
  101. -- -- A client has issued a request for some data.  Acting as a well
  102. -- -- behaved server, we fill the response data with some information
  103. -- -- Since this method was called from the ATReceive xcmd, it will
  104. -- -- return there upon completion causing the response to be sent
  105. -- -- out "magically".  If the response container is blank, the
  106. -- -- server will "autorespond".  Note that responses are limited to
  107. -- -- to 4624 characters.  This is a fundamental limitation of the
  108. -- -- AppleTalk ATP layer.  If you send more than 4624 characters,
  109. -- -- the response will be truncated for you.
  110. -- --
  111. -- visual effect wipe right
  112. -- go card "in box"
  113. -- put card field "response" into globalResponseData
  114. -- end HandleRequest
  115.  
  116. -- on HandleResponse
  117. -- global globalReceiveData
  118. -- --
  119. -- -- A server is returning a response to a previously queued request.
  120. -- -- Note that in order to handle a response correctly, you need to
  121. -- -- specify this or some other method in your ATRequest call.
  122. -- -- The response data has been placed in the globalReceiveData
  123. -- -- container for you.  All you have to do is look at it.
  124. -- --
  125. -- if globalReceiveData is not empty then
  126. -- push card
  127. -- set lockscreen to true
  128. -- go card "in box"
  129. -- get the number of lines in card field "messages"
  130. -- add 1 to it
  131. -- put globalReceiveData into line it of card field "messages"
  132. -- pop card
  133. -- set lockscreen to false
  134. -- end if
  135. -- end HandleResponse
  136.  
  137.  
  138. on okay
  139. --
  140. -- The method handles the default server response (It is not needed
  141. -- by clients). Iif you didn't specify a response in GlobalResponseData,
  142. -- this is what you'll get instead.
  143. --
  144. end okay
  145.  
  146. on run
  147. -- this routine runs the stack
  148. get the number of this bkgnd
  149. if it is 1 then
  150. put the number of this card into StartCard
  151. else
  152. go first card of bkgnd "ZoneInformation"
  153. put the number of the first card of bkgnd "ZoneInformation" into StartCard
  154. end if
  155.  
  156. repeat while (the suspended or the shiftKey is "up")
  157. makeCopy
  158. repeat with i = StartCard to the number of the last card of bkgnd "ZoneInformation"
  159. if (not(the suspended) and the shiftKey is "down") then
  160. exit run
  161. end if
  162. go to card i
  163. send "lookup" to this card
  164. if (not(the suspended) and the shiftKey is "down") then
  165. exit run
  166. end if
  167. send "unnamed" to this card
  168. add 1 to fld passes
  169. if (not(the suspended) and the shiftKey is "down") then
  170. exit run
  171. end if
  172. send "totalcard" to this card
  173. end repeat
  174. put the number of the first card of bkgnd "ZoneInformation" into StartCard
  175. end repeat
  176. end run
  177.  
  178. on verifyAll
  179. push this card
  180. go first card of bkgnd "ZoneInformation"
  181. repeat for (the number of cards in bkgnd "ZoneInformation") - 1
  182. verify
  183. go next
  184. end repeat
  185. pop card
  186. end verifyAll
  187.  
  188. on summarizeStack
  189. push this card
  190. go first card of bkgnd "Summaries"
  191. repeat for (the number of cards in bkgnd "Summaries")
  192. totalCard
  193. go next
  194. end repeat
  195. pop card
  196. end summarizeStack
  197.  
  198. on clearStack
  199. beep 2
  200. answer "Erase all data from every card in this stack?" ┬¼
  201. with "Cancel" or "OK"
  202. if it = "Cancel" then
  203. exit clearStack
  204. end if
  205. push card
  206. lock screen
  207. repeat with i = 1 to the number of cards in bkgnd "ZoneInformation"
  208. set cursor to busy
  209. go card i of bkgnd "ZoneInformation"
  210. clearCard
  211. end repeat
  212. repeat with i = 1 to the number of cards in bkgnd "Summaries"
  213. set cursor to busy
  214. go card i of bkgnd "Summaries"
  215. clearCard
  216. end repeat
  217. pop card
  218. unlock screen with dissolve
  219. end clearStack
  220.  
  221. on clearZoneCards
  222. beep 2
  223. answer "Erase all data from every zone card in this stack?" ┬¼
  224. with "Cancel" or "OK"
  225. if it = "Cancel" then
  226. exit clearZoneCards
  227. end if
  228. lock screen
  229. push card
  230. repeat with i = 1 to the number of cards in bkgnd "ZoneInformation"
  231. set cursor to busy
  232. go card i of bkgnd "ZoneInformation"
  233. clearCard
  234. end repeat
  235.  
  236. pop card
  237. unlock screen with dissolve
  238. end clearZoneCards
  239.  
  240. on clearSummaries
  241. beep 2
  242. answer "Erase all data from every zone card in this stack?" ┬¼
  243. with "Cancel" or "OK"
  244. if it = "Cancel" then
  245. exit clearSummaries
  246. end if
  247. lock screen
  248. push card
  249. repeat with i = 1 to the number of cards in bkgnd "Summaries"
  250. set cursor to busy
  251. go card i of bkgnd "Summaries"
  252. clearCard
  253. end repeat
  254.  
  255. pop card
  256. unlock screen with dissolve
  257. end clearSummaries
  258.  
  259. on getNav
  260. palette Navigotor
  261. end getNav
  262.  
  263. on makeCopy
  264. if isFile("Backup of Running Metrics") then
  265. eraseFile("Backup of Running Metrics")
  266. end if
  267. save stack as "Backup of Running Metrics"
  268. end makeCopy
  269. </script>
  270.     <background id="2662" file="background_2662.xml" name="ZoneInformation" />
  271.     <background id="4398" file="background_4398.xml" name="" />
  272.     <background id="8464" file="background_8464.xml" name="Summaries" />
  273.     <background id="64252" file="background_64252.xml" name="" />
  274.     <background id="65507" file="background_65507.xml" name="" />
  275.     <background id="66246" file="background_66246.xml" name="" />
  276.     <card id="65616" file="card_65616.xml" marked="false" name="" owner="65507" />
  277.     <card id="6984" file="card_6984.xml" marked="false" name="Zone List" owner="4398" />
  278.     <card id="66469" file="card_66469.xml" marked="false" name="" owner="66246" />
  279.     <card id="65181" file="card_65181.xml" marked="true" name="" owner="2662" />
  280.     <card id="11070" file="card_11070.xml" marked="false" name="" owner="8464" />
  281.     <card id="27183" file="card_27183.xml" marked="false" name="" owner="8464" />
  282.     <card id="27459" file="card_27459.xml" marked="false" name="" owner="8464" />
  283.     <card id="58617" file="card_58617.xml" marked="false" name="" owner="8464" />
  284.     <card id="58653" file="card_58653.xml" marked="false" name="" owner="8464" />
  285.     <card id="59005" file="card_59005.xml" marked="false" name="" owner="8464" />
  286.     <card id="59317" file="card_59317.xml" marked="false" name="" owner="8464" />
  287.     <card id="64503" file="card_64503.xml" marked="false" name="AllOthers" owner="64252" />
  288. </stack>
  289.